Skip to content

feat(fs): read SQLite databases through the one read path - #20

Merged
Steel-tech merged 1 commit into
mainfrom
claude/best-in-class-github-commit-ksgga0
Aug 19, 2026
Merged

feat(fs): read SQLite databases through the one read path#20
Steel-tech merged 1 commit into
mainfrom
claude/best-in-class-github-commit-ksgga0

Conversation

@Steel-tech

Copy link
Copy Markdown
Contributor

Continues the read decoder series from docs/TOOLS.md (files → directories → URLs → now SQLite).

read_file on a SQLite database — recognized by its 16-byte magic header, never its extension — renders a schema overview: each table with its columns and row count. An optional query input runs SQL against it, rows rendered as TSV, capped at 200 with the true total reported.

Two design points worth review:

  • Read-only is enforced by the engine, not string inspection. The connection opens mode=ro with PRAGMA query_only=ON, so a write fails inside SQLite however it's spelled — the test matrix includes INSERT, DELETE, DROP, and a comment-prefixed UPDATE, all rejected with the file unchanged.
  • Live-WAL databases fall back to immutable=1, the same open bullpen's README recommends for inspecting its store while sessions run. That's the point of the feature: an agent can now inspect bullpen's own coordination plane (sessions, todos, records) with its own read tool.

Validation: schema overview, TSV rendering and row caps, magic-based detection (a text file named .db is read as text), engine-level write rejection, bad-SQL errors, plus an integration test through read_file itself. Full gates green — fmt, clippy -D warnings, workspace tests ×2 (194 tests).

🤖 Generated with Claude Code

https://claude.ai/code/session_01KoSjfcJPjXpkVLTS2Vxwwr


Generated by Claude Code

A database file — recognized by its 16-byte magic header, never its
extension — renders as a schema overview: each table with its columns
and row count. An optional `query` runs SQL against it, rows as TSV
capped at 200 with the true total reported.

Read-only is enforced by the engine, not by string inspection: the
connection opens `mode=ro` with `query_only` on, so a write fails
inside SQLite however it is spelled. A database another process is
writing (live WAL) falls back to the `immutable=1` open bullpen's own
docs recommend for inspecting its store — which is the point: an agent
can now inspect bullpen's coordination plane with its own read tool.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KoSjfcJPjXpkVLTS2Vxwwr
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Steel-tech, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 17b9dc01-5097-4bf1-87a9-4b4e33a5a6c8

📥 Commits

Reviewing files that changed from the base of the PR and between 13c0508 and 5fe6278.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • README.md
  • crates/tools/Cargo.toml
  • crates/tools/src/fs.rs
  • crates/tools/src/lib.rs
  • crates/tools/src/sqlite.rs
  • docs/TOOLS.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Steel-tech
Steel-tech merged commit 2f8e7a7 into main Aug 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants